package com.marvels.approve.process.service;

import java.util.Date;
import java.util.List;
import java.util.Map;

import com.github.pagehelper.Page;
import com.marvels.approve.loan.dto.McamLoanApplyInfoDTO;
import com.marvels.approve.process.dto.FaceSigAppointmentDTO;
import com.marvels.approve.process.dto.LoanApplyCaseDTO;
import com.marvels.approve.process.dto.SysUserDTO;
import com.marvels.common.dto.ChannelUserDTO;
import com.marvels.common.exception.MarvelsBusinessException;

public interface IFaceSigAppointmentService {
	

	/**
	 * 视频面签查询
	 * @param faceSigAppointmentDTO
	 * @param pageNo
	 * @param pageSize
	 * @return
	 * @throws MarvelsBusinessException
	 */
	public Page<FaceSigAppointmentDTO> getVideoFaceSigAppointmentPage(FaceSigAppointmentDTO faceSigAppointmentDTO,Integer pageNo,Integer pageSize)throws MarvelsBusinessException;

	/**查询面签流水
	 * @
	 * @param FaceSigAppointmentDTO
	 * @return
	 * @throws MarvelsBusinessException
	 */
	public Page<FaceSigAppointmentDTO> getFaceSigAppointmentPage(FaceSigAppointmentDTO faceSigAppointmentDTO,Integer pageNo,Integer pageSize)throws MarvelsBusinessException;

	/**
	 * 面签状态查询
	 * @param FaceSigAppointmentDTO
	 * @return
	 * @throws MarvelsBusinessException 
	 */
	public FaceSigAppointmentDTO  findFaceSigStatus() throws MarvelsBusinessException;
	
	/**
	 * 
	 * 新建面签
	 * @return
	 * @throws MarvelsBusinessException
	 */
	public Integer addFacesigTask(FaceSigAppointmentDTO facesigappointment) throws MarvelsBusinessException;
	
	/**
	 * 取件
	 * @param facesigappointment
	 * @return
	 * @throws MarvelsBusinessException
	 */
	public Integer takeFacesig(LoanApplyCaseDTO loanApplyCaseDTO) throws MarvelsBusinessException;
	
	/**
	 * 查詢用戶权限
	 * @return
	 * @throws MarvelsBusinessException
	 */
	public SysUserDTO getUserCode() throws MarvelsBusinessException;
	
	/**
	 * 获取用户信息
	 * @return
	 * @throws MarvelsBusinessException
	 */
	public List<SysUserDTO> getUserList() throws MarvelsBusinessException;
	

	/**
	 * 查询面签日期
	 * @param loanId
	 * @return
	 */
	
	public FaceSigAppointmentDTO getRangeTime(String id) throws MarvelsBusinessException;
	
	/**
	 * 更新面签
	 * @param faceSigAppointmentDTO
	 * @return
	 * @throws MarvelsBusinessException
	 */
	public Integer updateAppointment(FaceSigAppointmentDTO faceSigAppointmentDTO,Boolean isNeedQueryUser) throws MarvelsBusinessException;

	public Integer queryCount() throws MarvelsBusinessException;
	
	public Integer checkRepeartLoanId(String loanId) throws MarvelsBusinessException;

	public Map<String, Object> queryHoliday(Map<String, Object> map) throws MarvelsBusinessException;

	public FaceSigAppointmentDTO selectByPrimaryKey(Integer appointmentId) throws MarvelsBusinessException;
	/**
	 * 查询需要消息提醒的预约单号
	 * @return
	 * @throws MarvelsBusinessException
	 */
	public List<FaceSigAppointmentDTO> selectNeedTips() throws MarvelsBusinessException;
	/**
	 * 更新为已过号
	 *
	 * @return
	 * @throws MarvelsBusinessException
	 */
	public Integer updateScanOutmoded() throws MarvelsBusinessException;
	
	public Map<String,Object> queryAppointmentDetail(Integer appointmentId) throws MarvelsBusinessException;
	/**
	 * 查询取消面签状态
	 * @param appointmentId
	 * @return
	 * @throws MarvelsBusinessException
	 */
	public FaceSigAppointmentDTO queryCancelStatus(Integer appointmentId) throws MarvelsBusinessException;
	/**
	 * 执行预约操作
	 * @param user
	 * @param acLoanApplyInfo
	 * @param timeSlotId
	 * @param date
	 * @param faceJobId
	 * @param isNeedQueryUser
	 * @throws MarvelsBusinessException
	 */
	public void doAppointment(ChannelUserDTO user,McamLoanApplyInfoDTO acLoanApplyInfo,Integer timeSlotId,Date date,String faceJobId,Boolean isNeedQueryUser) throws MarvelsBusinessException;
	/**
	 * 获取面签岗下的用户
	 * @return
	 * @throws MarvelsBusinessException
	 */
	public List<SysUserDTO> selectFaceSignUsers() throws MarvelsBusinessException;
	/**
	 * 查询已预约的人数
	 * @param faceSigAppointmentDto
	 * @return
	 * @throws MarvelsBusinessException
	 */
	public Integer queryDateTimeCount(FaceSigAppointmentDTO faceSigAppointmentDto) throws MarvelsBusinessException;
}

